import {  RouteRecordRaw } from 'vue-router'
import HomeView from '../views/main/index.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/home',

    children:[
      {
        path: '/home',
        name: 'home',
        component:() => import('../views/main/home/index.vue'),
      },
    
      {
        path: '/mine',
        name: 'mine',
        component:() => import('../views/main/mine/index.vue'),
      },
 
      {
        path: '/message',
        name: 'message',
        component:() => import('../views/main/message/index.vue'),
      }
    ]
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },

  {
    path: '/login',
    name: 'login',
    component:() => import('../views/login/login-index.vue')
  },

]

export default routes